package com.yfp.org.domain.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.yfp.common.core.annotation.Excel;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

/**
 *
 * @version 1.0
 * @date 2024-08-02 15:03
 */
@Data
@Tag(name = "异常订单导出")
public class ExceptionDerive {

    /**
     * 订单编号
     */
    @Schema(title = "订单编号")
    @Excel(name = "订单编号", needMerge = true, sort = 1)
    private String orderSn;

    /**
     * 订单时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Schema(title = "订单时间")
    @Excel(name = "下单时间", needMerge = true, sort = 2,dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date orderTime;

    /**
     * 下单用户
     */
    @Schema(title = "下单用户")
    @Excel(name = "用户名称", needMerge = true, sort = 3)
    private String userName;

    /**
     * 用户联系方式
     */
    @Schema(title = "用户联系方式")
    @Excel(name = "用户联系方式", needMerge = true, sort = 4)
    private String userMobile;

    /**
     * 套餐名称
     */
    @Schema(title = "套餐名称")
    @Excel(name = "餐品名称", needMerge = true, sort = 5)
    private String comboName;

    /**
     * 异常原因
     */
    @Schema(title = "异常原因")
    @Excel(name = "异常原因", needMerge = true, sort = 6)
    private String exceptionReason;


    // 异常来源


    /**
     * 订单类型（0小程序，1设备）
     */
    @Schema(title = "订单类型（0小程序，1设备）")
    @Excel(name = "订单类型", needMerge = true, sort = 8,readConverterExp = "1=设备,0=小程序")
    private String orderType;

    /**
     * 设备id
     */
    @Schema(title = "设备id")
    @Excel(name = "设备编号", needMerge = true, sort = 9)
    private String machineId;

    /**
     * 设备名称
     */
    @Schema(title = "设备名称")
    @Excel(name = "设备名称", needMerge = true, sort = 10)
    private String machineName;


    /**
     * 点位名称
     */
    @Schema(title = "点位名称")
    @Excel(name = "点位名称", needMerge = true, sort = 11)
    private String positionName;

    /**
     * 支付金额
     */
    @Schema(title = "支付金额")
    @Excel(name = "订单金额", needMerge = true, sort = 12)
    private BigDecimal amt;

    /**
     * 支付方式（1：支付宝 2：微信）
     */
    @Schema(title = "支付方式（1：支付宝 2：微信）")
    @Excel(name = "支付方式", needMerge = true, sort = 13,readConverterExp = "1=支付宝,2=微信")
    private String payType;

    /**
     * 异常标记操作人
     */
    @Schema(title = "是否异常")
    @Excel(name = "订单状态", needMerge = true, sort = 14,readConverterExp = "0=异常,1=正常")
    private String isExceptionOper;


}
